/usr/local/squid/sbin/squid -z 初始化缓存空间
/usr/local/squid/sbin/squid 启动
/usr/local/squid/sbin/squid -k shutdown 停止
/usr/local/squid/sbin/squid -k reconfigure 重新载入配置文件
/usr/local/squid/sbin/squid -k rotate 轮循日志
acl all src 0.0.0.0/0.0.0.0
acl manager proto http
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.1
acl Safe_ports port 80
acl CONNECT method CONNECT
http_access allow all
http_reply_access allow all
acl OverConnLimit maxconn 16
http_access deny OverConnLimit
icp_access deny all
miss_access allow all
ident_lookup_access deny all
http_port 8080 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin ?
cache deny QUERY
cache_mem 1 GB
fqdncache_size 1024
maximum_object_size_in_memory 2 MB
memory_replacement_policy heap LFUDA
cache_replacement_policy heap LFUDA
cache_dir ufs /home/cache 5000 32 512
max_open_disk_fds 0
minimum_object_size 1 KB
maximum_object_size 20 MB
cache_swap_low 90
cache_swap_high 95
ipcache_size 2048
ipcache_low 90
ipcache_high 95
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log squid
cache_store_log none
emulate_httpd_log on
refresh_pattern . 0 20% 4320 override-expire override-lastmod reload-into-ims ignore-reload
acl buggy_server url_regex ^http://.... http://
broken_posts allow buggy_server
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
request_entities off
header_access header allow all
relaxed_header_parser on
client_lifetime 120 minute
cache_mgr sky@test.com
cache_effective_user squid
cache_effective_group squid
icp_port 0
cache_peer 127.0.0.1 parent 80 0 no-query default multicast-responder no-netdb-exchange
cache_peer_domain 127.0.0.1
hostname_aliases 127.0.0.1
error_directory /usr/share/squid/errors/Simplify_Chinese
always_direct allow all
ignore_unknown_nameservers on
coredump_dir /var/log/squid
max_filedesc 2048
half_closed_clients off
buffered_logs on
acl tianya referer_regex -i tianya
http_access deny tianya
deny_info tianya
acl baidu req_header User-Agent Baiduspider
http_access deny baidu
acl OverConnLimit maxconn 128
http_access deny OverConnLimit
acl myip dst 222.18.63.37
http_access deny !myip
acl Manager proto cache_object
acl Localhost src 127.0.0.1 222.18.63.37
http_access allow Manager Localhost
cachemgr_passwd 53034338 all
http_access deny Manager
acl all src 0.0.0.0/0.0.0.0
acl Safe_ports port 80
http_access deny !Safe_ports
http_access allow all
visible_hostname happy.swjtu.edu.cn
cache_mgr ooopic2008@qq.com
cache_effective_user squid
cache_effective_group squid
tcp_recv_bufsize 65535 bytes
cache_peer 127.0.0.1 parent 80 0 no-query originserver
error_directory /usr/local/squid/share/errors/Simplify_Chinese
icp_port 0
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin ? .php .cgi .avi .wmv .rm .ram .mpg .mpeg .zip .exe
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
cache_store_log none
pid_filename /usr/local/squid/var/logs/squid.pid
emulate_httpd_log on
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
cache_log /usr/local/squid/var/logs/cache.log
access_log /usr/local/squid/var/logs/access.log combined
coredump_dir /usr/local/squid/var/cache
cache_dir ufs /usr/local/squid/var/cache 10000 16 256
dns_children 32
hosts_file /etc/hosts
cache_mem 400 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 32768 KB
maximum_object_size_in_memory 4096 KB
emulate_httpd_log on
acl picurl url_regex -i .bmp$ .png$ .jpg$ .gif$ .jpeg$
acl mystie1 referer_regex -i happy.swjtu.edu.cn
http_access allow mystie1 picurl
acl nullref referer_regex -i ^$
http_access allow nullref
acl hasref referer_regex -i .+
http_access deny hasref picurl